package com.newshub.monitor.service;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 日志分析服务接口
 * 整合业务日志、异常日志和日志搜索功能
 */
public interface LogAnalysisService {
    
    /**
     * 获取业务操作日志
     */
    Map<String, Object> getBusinessLogs(String module, String username, String operation, 
                                       LocalDateTime startTime, LocalDateTime endTime, 
                                       Integer pageNum, Integer pageSize);
    
    /**
     * 获取异常日志
     */
    Map<String, Object> getExceptionLogs(String exceptionType, String alertLevel,
                                        LocalDateTime startTime, LocalDateTime endTime,
                                        Integer pageNum, Integer pageSize);
    
    /**
     * 搜索日志
     */
    Map<String, Object> searchLogs(String keyword, String logLevel, String module,
                                  LocalDateTime startTime, LocalDateTime endTime,
                                  Integer pageNum, Integer pageSize);
    
    /**
     * 获取实时日志
     */
    Map<String, Object> getRealtimeLogs(Integer limit, Boolean follow);
    
    /**
     * 获取日志统计信息
     */
    Map<String, Object> getLogStats(LocalDateTime startTime, LocalDateTime endTime);
    
    /**
     * 获取用户活动统计
     */
    Map<String, Object> getUserActivityStats(LocalDateTime startTime, LocalDateTime endTime, Integer limit);
}
